Template.exploreUserContent.onCreated(function() {
  this.autorun(() => {
    this.infiniteScroll({
      query: {
        text: Router.current().params.query.user
      },
      publication: 'Explore.Users.ByText',
      countPublication: 'Explore.Users.ByText.Counts',
      perPage: 20
    });
  });
});

Template.exploreUserContent.helpers({
  results: function() {
    let text = Router.current().params.query.user;
    return Meteor.users.find({
      username: { $regex: new RegExp(text) }
    },{
      limit: Template.instance().getLimit(),
    });
  },
  loading: function() {
    return !Template.instance().resultSub.ready();
  }
});